﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">
<meta charset="utf-8">
<title>${webinfo.title }</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="${webinfo.descript }" />
<meta name="author" content="${webinfo.owner }" />
<meta name="keyworkds" content="${webinfo.keyword }" />
<!-- css -->
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/fancybox/jquery.fancybox.css" rel="stylesheet">
<link href="css/flexslider.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />

<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
<style type="text/css">
*{
margin:0;padding:0;
-webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-tap-highlight-color: rgba(210,210,210,0.35); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
}
body{font-family:"微软雅黑";font-size:12px;}
ul,li{list-style:none;}
.ylcon{width:100%;min-width:320px;}
.tit{height:26px;line-height:26px;padding:0px 15px;position:relative;font-size:15px;color:#aaa;border-bottom:1px solid rgba(0, 0, 0, 0.15);}
 
.story{border-bottom:1px dashed #cecece;padding:0 15px 3px;position:relative;}
.story_t{font-size:1.2em;color:rgba(0,0,0,1);padding-top:5px;padding-bottom:2px;}
.story_m{color:rgba(110,110,110,1);line-height:21px;word-break:break-all;word-wrap:break-word;overflow:hidden;font-size:1.2em;padding:2px 0;}
.story_time{color:rgba(154,154,154,1);padding:2px 0;}
.story_hf{background:rgb(245,245,245);font-size:1.2em;border:1px solid rgba(204,204,204,0.2);border-radius:2px;color:rgba(110,110,110,1);padding:4px;margin-bottom:5px;}
.opbtn{position:absolute;top: 0;right: 0;}
</style>
</head>
<body>
	<div id="wrapper">
		<!-- start header -->
		<header>
			<div class="navbar navbar-default navbar-static-top">
				<div class="container">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle" data-toggle="collapse"
							data-target=".navbar-collapse">
							<span class="icon-bar"></span> <span class="icon-bar"></span> <span
								class="icon-bar"></span>
						</button>
						<a class="navbar-brand" href="index.html"><img
							src="${webinfo.logo }" alt="${webinfo.title }" /></a>
					</div>
					<div class="navbar-collapse collapse ">
						<ul class="nav navbar-nav">
							<li><a href="_index.html#maodian1">首页</a></li>
							<li><a href="_index.html#maodian_service">提供服务</a></li>
							<li><a href="_index.html#maodian_aboutus">关于我们</a></li>
							<li><a href="_index.html#maodian_price">产品展示</a></li>
							<li><a href="_index.html#maodian_content">服务网点</a></li>
							<li><a
								href="_index.html#maodian_content">最近新闻</a></li>
							<li><a href="contact.jsp">联系我们</a></li>
						</ul>
					</div>
				</div>
			</div>
		</header>
		<!-- end header -->
		<section id="content">
			<div class="container content">
				<!-- Service Blcoks -->
				<div class="row service-v1 margin-bottom-40">
					<div class="col-md-4" align="center" style="width: 80%;position: relative;margin-left: 10%;margin-right: 10%;">
					<c:if test="${c.belong != 9 and c.belong !=6 and c.belong !=7 and c.belong != 8 }">
						<c:if test="${c.type eq 1}">
							<img class="img-responsive" src="${c.resource }"
								alt="${c.title }" style="width:100%;position: relative;">
						</c:if>
						<c:if test="${c.type eq 2}">
							<video  id="showVedio" poster="${c.fmResource }" src="${c.resource }" controls="controls" preload="none" width="100%" height="100%" ></video>
						</c:if>
						<c:if test="${c.type eq 3}">
							<embed type="application/x-shockwave-flash" src="${c.resource }" width="357" height="210" id="showSwf" quality="high" wmode="transparent" scale="noscale" 
       	 								menu="false" allowfullscreen="true" flashvars="lm=">
						</c:if>
					
						<span style="width:100%;margin: 0 auto;">
							<h2>${c.title }</h2>
							<hr style="height:5px;border:none;border-top:5px ridge green;"/>
							<p style="text-align: left;">${c.content }</p>
					</span>
					</c:if>
					<c:if test="${c.belong eq 9 or c.belong eq 6 or c.belong eq 7 or c.belong eq 8}">
						<span style="width:100%;margin: 0 auto;">
							<h2>${c.title }</h2>
							<hr style="height:5px;border:none;border-top:5px ridge green;"/>
							<p style="text-align: left;">${c.content }</p>
					</span>
					<div class="row service-v1 margin-bottom-40">
					<form id="bbs_form" style="width: 80%;position: relative;margin-left: 10%;margin-right: 10%;">
						<input type="hidden" name="caseId" value="${c.id }"/>
						<input type="hidden" name="userId" value="${u.id }"/>
						<div class="form-group has-feedback" style="text-align: left;">
							<label for="message" style="float: left;width: 50%;position: relative;">${user.userName }发表评论*</label>
<!-- 							<label for="message" style="float: left;width: 50%;position: relative;text-align: right;">登陆|注册</label> -->
							<textarea class="form-control" rows="3" name="content" id="message"></textarea>
							<i class="fa fa-pencil form-control-feedback"></i>
							<input type="submit" value="发布" class="btn btn-default" style="float: right;">
						</div>
					</form>
					<br><br>
					<div style="clear: both;"></div>
					<c:forEach items="${bbs }" var="bbs">
						<div class="ylcon" style="width: 90%;background-color: white;">
							<div id="messDivId" style="text-align: left;">
								<div class="story">
								<div class="opbtn"></div>
								<p class="story_t" style="width: 80%;position: relative;float: left;">${bbs.user.userName }</p>
								<p class="story_time" style="width: 20%;position: relative;float: right;">${bbs.pubTime }</p>
								<p class="story_m" style="width: 100%;position: relative;">${bbs.content }</p>
<%-- 								<p class="story_hf">@${bbs.user.userName }:${bbs.content }</p> --%>
								</div>
							</div>
						</div>
					</c:forEach>
					</div>
					</c:if>
					</div>
				</div>
			<!-- End Service Blcoks -->

			<hr class="margin-bottom-50">
	</div>
	</section>
	<footer>
		<div class="container">
			<p style="text-align: center;">
				${webinfo.footer }<a target="_blank" href="${webinfo.domain }">${webinfo.title }</a>
			</p>
		</div>
	</footer>
	</div>
	<a href="#" class="scrollup"><i class="fa fa-angle-up active"></i></a>
	<!-- javascript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="js/jquery.js"></script>
	<script src="js/jquery.easing.1.3.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/jquery.fancybox.pack.js"></script>
	<script src="js/jquery.fancybox-media.js"></script>
	<script src="js/portfolio/jquery.quicksand.js"></script>
	<script src="js/portfolio/setting.js"></script>
	<script src="js/jquery.flexslider.js"></script>
	<script src="js/animate.js"></script>
	<script src="js/custom.js"></script>
	<script type="text/javascript">
		$(function(){
			$('#bbs_form').bind('submit',function(){
				$.ajax({
					url:'axxf/addBBS.do',
					type:'post',
					data:$('#bbs_form').serialize(),
					dataType:'text',
					success:function(strValue){
						alert(strValue);
						$('#message').val('');
						window.location.reload();
// 						window.location.reload();
					}
					});
				return false;
			});
		});
	</script>
</body>
</html>